<?php $this->load->view('admin/common/pageHead');?>
<?php $this->load->view('admin/common/pageHeader');?>

<div class="fLeft">
	<?php $this->load->view('admin/common/left_nav'); ?>
</div>
<table
	style="border-color: #EAC8B3; border-left: 1px solid #EAC8B3; border-right: 1px solid #EAC8B3; border-style: solid; border-width: 1px;"
	align="center">
	<tbody>
		<tr>
			<td colspan="3" class="fotter-color" align="center"><b>Edit Gallery</b>
			</td>
		</tr>
		<tr>
			<td colspan="3" class="style2" align="left">
				<form name="form1" action="/updateGallery" method="post"
					enctype="multipart/form-data" onSubmit="return editgallery();">
					<input type="hidden"
						value="<?php echo $galleryName['gallery_Id'];?>" name="gallery_id"
						id="gallery_id" /> <input type="hidden"
						value="<?php echo $galleryName['gallery_image'];?>"
						name="oldPhoto" id="oldPhoto" />
					<table border="0" cellpadding="0" cellspacing="0" height="25"
						width="550" align="center">
						<tbody>
							<tr>
								<td class="tdclass" width="150">Painting-Name:<span
									style="font-family: Arial, Helvetica, sans-serif; font-size: 16px; color: #E60000; padding: 7px;">*</span>
								</td>
								<td><input name="gName" class="form_input" id="gName"
									value="<?php echo $galleryName["gallery_name"]; ?>" type="text">
								</td>
							</tr>
							<tr>
								<td class="tdclass" width="150">Painting-Image:<span
									style="font-family: Arial, Helvetica, sans-serif; font-size: 16px; color: #E60000; padding: 7px;"></span>
								</td>
								<td><img
									src="/public/images/paintings_box/<?php echo $galleryName["gallery_image"]; ?>"
									name="oldPhoto" id="oldPhoto" />
								</td>
							</tr>
							<tr>
								<td>&nbsp;</td>
							</tr>
							<tr>
								<td class="tdclass" width="150">Update-Image:<span
									style="font-family: Arial, Helvetica, sans-serif; font-size: 16px; color: #E60000; padding: 7px;">*</span>
								</td>
								<td><input name="updatepic" class="form_input" id="updatepic"
									value="" type="file">
								</td>
							</tr>
							<tr>
								<td>&nbsp;</td>
							</tr>
							<tr>
								<td class="tdclass" width="150">Painting-Size:</td>
								<td><input name="Gsize" class="form_input" id="Gsize"
									value="<?php echo $galleryName["gallery_size"]; ?>" type="text">
								</td>
							</tr>
							<tr>
								<td>&nbsp;</td>
							</tr>
							<tr>
								<td class="tdclass" width="150">Painting-Price:</td>
								<td><input name="Gprice" class="form_input" id="Gprice"
									value="<?php echo $galleryName["gallery_prize"]; ?>"
									type="text"></td>
							</tr>
							<tr>
								<td>&nbsp;</td>
							</tr>
							<tr>
								<td class="tdclass" width="150">Select Artist:</td>
								<td><select name="artistID" id="artistID">
										<option value="">Please Select</option>
										<?php foreach ($artist as $temp => $admin){
          	            if(isset($artist) && !empty($artist)){ ?>
										<option value="<?php echo $admin['artist_id'];?>"
										<?php if ($mappingid['artist_id']==$admin['artist_id']){echo 'Selected';} ?>>
											<?php echo $admin['fname'];?>
										</option>
										<?php  }?>
										<?php }?>
										<option value="other" onclick="checkIt(this);">Other</option>
								</select>
								</td>
							</tr>
							<tr>
								<td>&nbsp;</td>
							</tr>
							<tr>
								<td class="tdclass" width="150">Select Category:</td>
								<td><select name="categoryID" id="categoryID"
									onchange="chooseTheme()">
										<option value="">Please Select</option>
										<?php foreach ($category as $temp => $admin){
          	            if(isset($category) && !empty($category)){ ?>
										<option value="<?php echo $admin['cat_id'];?>"
										<?php if ($mappingid['cat_id']==$admin['cat_id']){echo 'Selected';} ?>>
											<?php echo $admin['name'];?>
										</option>
										<?php  }?>
										<?php }?>

								</select>
								</td>
							</tr>
							<tr>
								<td>&nbsp;</td>
							</tr>
							<tr>
								<td class="tdclass" width="150">Select Theme:</td>
								<td>
									<div id="themeDiv">
										<select name="themeID" id="themeID">
											<option value="">Please Select</option>
											<?php foreach ($theme as $temp => $admin){
          	            if(isset($theme) && !empty($theme)){ ?>
											<option value="<?php echo $admin['theme_id'];?>"
											<?php if ($mappingid['theme_id']==$admin['theme_id']){echo 'Selected';} ?>>
												<?php echo $admin['theme_name'];?>
											</option>
											<?php  }?>
											<?php }?>
										</select>
									</div>
								</td>
							</tr>
							<tr>
								<td>&nbsp;</td>
							</tr>
							<tr>
								<td class="tdclass" width="150">Select Medium:</td>
								<td>
									<div id="mediumDiv">
										<select name="mediumID" id="mediumID">
											<option value="">Please Select</option>
											<?php foreach ($medium as $temp => $admin){
          	            if(isset($medium) && !empty($medium)){ ?>
											<option value="<?php echo $admin['medium_id'];?>"
											<?php if ($mappingid['medium_id']==$admin['medium_id']){echo 'Selected';} ?>>
												<?php echo $admin['medium_name'];?>
											</option>
											<?php  }?>
											<?php }?>
										</select>
									</div>
								</td>
							</tr>
							<tr>
								<td>&nbsp;</td>
							</tr>
							<tr>
								<td>&nbsp;</td>
								<td colspan="10" height="58" align="left"><input name="update"
									class="form_input" id="update" value="Update" type="submit">&nbsp;<input
									value="Cancel" class="" onclick="javascript:history.back();"
									type="reset">
								</td>
							</tr>

						</tbody>
					</table>

				</form>
			</td>
		</tr>
	</tbody>






</table>
